home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / BPAS9.ARJ / TEMPLT.PAS < prev    next >
Pascal/Delphi Source File  |  1991-09-01  |  3KB  |  65 lines

  1. {---------------------------------------------------------------------
  2.  PROGRAM: Template
  3.  
  4.  This program gives the programmer a template to work from.
  5.  
  6.  It does this with a small amount of code in a
  7.  procedure called INIT.  The program also USES the CRT Unit to ClrScr
  8.  at initiation.  It also adds READLN to the end of the program
  9.  so that, when it is run, the output is sent to the screen and the
  10.  programmer is allowed to see the output without pressing ALT F5.
  11.  
  12.  Author:                    Mike Benedict
  13.  Date Started:              5/16/91
  14.  Latest Revision:           9/01/91
  15.  Version:                   Turbo Pascal 6.0
  16.  
  17.  -------------------------------------------------------------------}
  18.  
  19.  PROGRAM Template;
  20.  
  21.  USES                                      { USES is a reserved word that  }
  22.    Crt;                                    { tells the compiler to use one }
  23.                                            { of the standard libraries or  }
  24.                                            { units listed in the Pascal    }
  25.                                            { Programmer's Guide.           }
  26.  
  27.  {------------------------------------}    { Anything between brackets  }
  28.  {            PROCEDURES              }    { is ignored at compile time }
  29.  {------------------------------------}    { and allows clear comments  }
  30.                                            { within source code.        }
  31.  
  32.  {-----------------------------}
  33.  {          INIT.PROC          }
  34.  {-----------------------------}
  35.  
  36.  PROCEDURE Init;
  37.  
  38.  BEGIN
  39.    TextBackground(Blue);                   { Procedures and functions that   }
  40.    TextColor(White);                       { are pre-defined by Borland's    }
  41.    ClrScr;                                 { Reference manual.  They are     }
  42.  END;                                      { called the Run-Time Library.    }
  43.  
  44.  {-----------------------------}
  45.  {         .PROC          }
  46.  {-----------------------------}
  47.  
  48.  PROCEDURE Null;
  49.  
  50.  BEGIN
  51.  END;
  52.  
  53.  {------------------------------------}
  54.  {           MAIN PROGRAM             }
  55.  {------------------------------------}
  56.  
  57.   BEGIN
  58.     Init;                                  { Init calls the procedure INIT.     }
  59.     ReadLn;
  60.   END.                                     { ReadLn stops the program for user  }
  61.                                            { input.           This is a common  }
  62.                                            { way to get the program to stop and }
  63.                                            { show you the screen without pres-  }
  64.                                            { sing ALT-F5.                       }
  65.